﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;

namespace Conteinerid.Aspects
{
    public abstract class PointCut
    {
        IList<PointCut> ands = new List<PointCut>();
        public ToInvokeWhen ToInvokeWhen
        {
            get; protected set;
        }

        public void And(PointCut pointCut)
        {
            ands.Add(pointCut);
        }

        public IList<PointCut> Ands{
            get
            {
                return ands.Select(p=>p).ToList();
            }
        }

        public abstract bool Apply(MethodInfo method);
    }
}
